# from mysql_main import main_opera

#
# def create_table():
#     """创建示例表（如果不存在）"""
#     create_table_query = """
#                          CREATE TABLE IF NOT EXISTS users
#                          (
#                              id    INT AUTO_INCREMENT PRIMARY KEY,
#                              name  VARCHAR(255) NOT NULL,
#                              age   INT,
#                              email VARCHAR(255) UNIQUE
#                          ) ENGINE = InnoDB \
#                          """
#     main_opera(create_table_query, None,False)
#
#
# def insert_user(name, age, email):
#     """插入新用户"""
#     query = "INSERT INTO users (name, age, email) VALUES (%s, %s, %s)"
#     params = (name, age, email)
#     return main_opera(query, params, False)
#
#
# def get_all_users():
#     """获取所有用户"""
#     query = "SELECT * FROM users"
#     return main_opera(query, None,True)
#
#
# def get_user_by_id(user_id):
#     """根据ID获取用户"""
#     query = "SELECT * FROM users WHERE id = %s"
#     params = (user_id,)
#     return main_opera(query, params, True)
#
#
# def update_user_email(user_id, new_email):
#     """更新用户邮箱"""
#     query = "UPDATE users SET email = %s WHERE id = %s"
#     params = (new_email, user_id)
#     return main_opera(query, params, False)
#
#
# def delete_user(user_id):
#     """删除用户"""
#     query = "DELETE FROM users WHERE id = %s"
#     params = (user_id,)
#     return main_opera(query, params,False)
